STATUS CODE
This field is returned by certain file-related statements (for example, CREATE, OPEN, READ, etc.) that result in a false condition, thereby setting the next true/false status indicator to F. STATUS CODE is a token field and contains a value indicating the reason for the I/O command failure, such as:
FI_AOF - Record Already on File (following a WRITE or REWRITE)
FI_EOF - End of File (following a READNEXT)
FI_NOF - Record Not in File (following a READ)
STATUS CODE can be used to set the primary key to the system message file (--- MESSAGE) to obtain a descriptive I/O error message, as shown in the example below.
The descriptive message is the same message that would be generated by setting the FAIL (or FT) parameter on the I/O statement appropriately (where 0=nothing, 1=warning, 2=error, 3=cancel).
|